package com.vue.vuedemo.map;

import com.vue.vuedemo.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GoodsMapper {
//    @Select("select * from goods")
	@Select("select id,title,add_time,zhaiyao,click,img_url,sell_price,market_price,stock_quantity from goods")
    public List<Goods> getAllGoods();

//    @Select("select * from goods where id=#{id}")
	 @Select("select id,title,goods_no,add_time,zhaiyao,click,img_url,sell_price,market_price,stock_quantity from goods where id=#{id}")
    public Goods getGoodsInfo(Integer id);


    @Select("select content,title from goods where id=#{id}")
    public Goods getDesc(Integer id);

    @Select("select id,title,sell_price,img_url from goods where id=#{id}")
    public Goods getShopcart(Integer id);

}
